﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../Script/jquery-easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../Script/jquery-easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../Script/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../Script/jquery-easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script>
        $(function () {
            $('#test').treegrid({
            width:700,
				height:350,
				nowrap: false,
				rownumbers: true,
				animate: true,
				collapsible: true,
				url: 'MagicBag.CRM.Service/DepartmentService.crm?act=GetDepartments',
				idField: 'ID',
				treeField: 'ID',//显示树字段，图标显示在此字段
//				frozenColumns: [[
//	                { title: '编号', field: 'ID', width: 200,
//	                    formatter: function (value) {
//	                        return '<span style="color:red">' + value + '</span>';
//	                    }
//	                }
//				]],
				columns: [[
                    { field: 'ID', title: '编号', width: 150 },
					{ field: 'CName', title: '中文名称', width: 150 },
					{ field: 'EName', title: '英文名列', width: 220},
					{ field: 'Remark', title: '备注', width: 150}
				]]
            });
        });
    </script>
</head>
<body>
    <table id="test">
    </table>
</body>
</html>
